package com.example.springbootdemo.setvalue;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @Auther: zyb
 * @Date: 2018/10/29 14:37
 * @Description: 根据前缀,读取配置文件信息,属性名和配置文件中的一致就好了,需要set方法
 */

@Data
@Component
@ConfigurationProperties(prefix = "author")
public class AuthorSetting {

    private String name;
    private String age;
    private String num;

}
